package com.trainingcloud.test;

import java.io.File;
import java.io.InputStream;
import java.util.Date;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.trainingcloud.dao.DocumentDAO;
import com.trainingcloud.dao.HistoryDAO;
import com.trainingcloud.entity.Document;
import com.trainingcloud.exception.DAOException;
import com.trainingcloud.exception.SystemException;

public class DownloadAction extends ActionSupport
{
	private String filename;
	
	public String execute() throws Exception
	{
		filename = "6b0b5eec-020c-463a-8e7b-2953d5a1d89a";
		return null;
	}
	
	public InputStream getInputStream() throws Exception
	{
		return ServletActionContext.getServletContext().getResourceAsStream("/documents/empty.txt");
	}

	public String getFilename() 
	{
		return filename;
	}
	
	public void setFilename(String filename) 
	{
		this.filename = filename;
	}
	
}
